﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<nelech.Models.DBModel.Text>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	EditText
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>EditText</h2>
  
       
    <% using (Html.BeginForm("EditText", "Admin", FormMethod.Post, new { enctype = "multipart/form-data"})) {%>

        <fieldset>
            <legend>שדות:</legend>
            <input type="hidden" name="id" value="<%= Model.id %>" />
    <input type="hidden" name="title" value="<%= Model.title %>" />
           <h2><%= Model.title %></h2>
             
            <p>
            
            <label for="text1">תוכן</label>
                 <%= Html.TextArea("text1", new {rows="25", cols="80", id="mce"})%>
                <%= Html.ValidationMessageFor(model => model.text1) %>
            
            </p>
            
           
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%=Html.ActionLink("חזרה לרשימה", "Index") %>
    </div>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
 <script src="../../Scripts/tinymce/jscripts/tiny_mce/tiny_mce.js" type="text/javascript"></script>

    <script type="text/javascript">


      
        tinyMCE.init({ theme: "advanced",
            mode: "exact",
            elements: "text1",
            plugins: "",
            theme_advanced_buttons1_add_before: "forecolor,backcolor,copy,paste,fontselect", 
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left",
            theme_advanced_more_colors: true,
            theme_advanced_styles: "NormalBold 1=firstBold;Normal 2=first;Normal 3=second;", 
            content_css: "/Content/tinymce.css"
        });


      
       
    </script>
</asp:Content>

